﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using ServeurRSS_1_0.Source.Model;

namespace ServeurRSS_1_0.Services
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IServiceRssManagement" in both code and config file together.
    [ServiceContract]
    //[AspNetCompatibilityRequirements(
    //          RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public interface IServiceRssManagement
    {
        [OperationContract]
        string addListRssToDirectory(List<System.Guid> listIdRss, List<string> listUrlRss, System.Guid dir);

        [OperationContract]
        string addExistingRssToDirectory(System.Guid dir, System.Guid rss);

        [OperationContract]
        string addNewRssToDirectory(System.Guid dir, string urlRss);

        [OperationContract]
        string eraseListRssFromDirectory(Guid dir,  Guid UserId, List<Guid> listId);

        [OperationContract]
        string eraseRssFromDirectory(System.Guid dir,  Guid UserId, System.Guid rss);

        [OperationContract]
        string moveRss(System.Guid oldId, System.Guid newId, System.Guid rssID);

        [OperationContract]
        List<DataRss> getRssForDirectory(System.Guid dir);

        [OperationContract]
        List<DataRss> getAllRssForUser(System.Guid idUser, bool? owner = null);

        [OperationContract]
        RssTree getAllHierarchicalRssForUser(System.Guid idUser);

        [OperationContract]
        string createRssForUser(System.Guid user, string nameRss, System.Guid idDirectory);

        [OperationContract]
        List<DataRss> getAllRss();

        [OperationContract]
        List<DataItem> getListItemForRss(System.Guid rss, int limit = 20, int page = 1);

        [OperationContract]
        bool setReadedItem(List<System.Guid> listItemsRead, Guid idUser);
    }
}
